package cn.zhx.xa.system.dao;


import cn.zhx.xa.model.entity.SysMenu;
import cn.zhx.xa.system.mapper.SysMenuMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Component;

@Component
public class SysMenuDao extends ServiceImpl<SysMenuMapper, SysMenu> {

    public int countByParentId(Long id) {
        return Math.toIntExact(lambdaQuery()
                .eq(SysMenu::getParentId, id)
                .count());
    }


}
